<?php echo $doctype; ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>LuckyLine</title>
    <meta property="wb:webmaster" content="44de9aea5a865f6d" />
	<meta name="viewport" content="width=640" />
	<?php echo $meta_charset."\n"; ?>
	<?php echo $link."\n"; ?>
	<?php echo $jquery."\n"; ?>
	<script>
	var vpic=0;
	var skey='<?php echo $skey;?>';
	var tkey='<?php echo $tkey;?>';
	var access_token='';
	var uid='';
	var k='';
	
	function save(){
		$.ajax({
			url: '<?php echo base_url(); ?>wap/save',
			type: 'post',
			dataType: 'text',
			data: 'openid='+uid+'&access_token='+access_token+'&status='+k+'&content='+$('#content').val()+'&pic='+vpic,
			cache: false,
			success: function (text) {
				if(text=='0'){
					$('#content').val('外星人来攻打地球啦！！想要第一时间成为保卫世界的英雄吗？超好评第一人称射击游戏《怪物神枪手》空降中国市场！Lucky line排队活动已经启动！选择角色，加入队列，只要参与就有机会获得游戏手机或其他神秘礼品哦！！还在等什么？神枪手们，戳这里狂热参与吧！');
					location='/wap/end';
				}else{
					//alert('数据提交失败，请稍后再试!');
					//alert(text.responseText);
				}
			},
			beforeSend: function () {
				if ($('#content').val() == '') {
					alert('请输入内容!');
					$('#content').focus();
					return false;
				}
				if ($('#content').val().length>120) {
					alert('发布内容超过字数限制!');
					$('#content').focus();
					return false;
				}
			},
			error: function (text) {
				//alert(text.responseText);
				//$('#list').html('系统错误');
			}
		});
	}

	function slogin(){
		var cookie=getCookie('dis');
		if(cookie!=null&& cookie!=''){
			access_token=cookie.split('_')[1];
			uid=cookie.split('_')[0];
			k='sina';
			$('#index').hide();
			$('#pubs').show();
			showcount();
		}else{
			location='https://api.weibo.com/oauth2/authorize?client_id='+skey+'&redirect_uri=<?php echo base_url(); ?>index.php?c=wap&m=index&response_type=code&display=mobile&po=s';
		}
	}
	
	function tlogin(){
		var cookie=getCookie('dit');
		if(cookie!=null&& cookie!=''){
			access_token=cookie.split('_')[1];
			uid=cookie.split('_')[0];
			k='tencent';
			$('#index').hide();
			$('#pubs').show();
			showcount();
		}else{
			location='http://openapi.qzone.qq.com/oauth/show?which=ConfirmPage&display=mobile&response_type=code&client_id=' + tkey + '&redirect_uri=<?php echo urlencode(base_url(). 'index.php?c=wap&m=index&po=t')?>&scope=get_user_info,add_share,list_album,upload_pic,check_page_fans,add_t,add_pic_t,del_t,get_repost_list,get_info,get_other_info,get_fanslist,get_idolist,add_idol,del_idol,add_one_blog,add_topic,get_tenpay_addr';
		}
	}
	
	function getCookie(a) {
	    var b = document.cookie.match(new RegExp(a + "=([^;]*)"));
	    return b != null ? unescape(b[1]) : null
	}
	
	function showcount(){
		$.ajax({
			url: '<?php echo base_url(); ?>/wap/countnum',
			type: 'post',
			dataType: 'text',
			cache: false,
			success: function (text) {
				$('#countnum').html(parseInt(text)+1);
			},
			error: function (text) {
				//alert(text.responseText);
				//$('#list').html('系统错误');
			}
		});
	}
	
	function sel(vals){
		//alert(vals);
		//$('input[name="pic"]').removeAttr('checked');
		$('input[name="pic"][value='+vals+']').prop('checked',true);
	}
	</script>
</head>
<body>
<div id="index">
<div class="topimgdox"></div>
<div class="back">
	<div class="barbox">
		<ul>
			<li class="barname"></li>
			<li class="sinabt"><a href="javascript:void(0);" onclick="slogin();"><img src="/images/wap/sinabt.png" border="0" width="75" height="74"></a></li>
			<li class="tencentbt"><a href="javascript:void(0);" onclick="tlogin();"><img src="/images/wap/tencentbt.png" border="0" width="75" height="74"></a></li>
		</ul>
	</div>
	<div class="txtbox">
		<ul>
			<li class="name"><img src="/images/wap/p1.png" border="0" width="170" height="47"></li>
			<li class="txt">点击“参与”，通过你的微博账号登录活动页面，发布微博分享即可入选神枪手的队列！发布成功后，你就可以看见你自己的发布内容出现在时间轴上哦~活动结束以后，我们将从所有参与活动的神枪手当中抽取被选中的救世主，并送给他们包括极品游戏神器、游戏货币、精选装备在内的神秘奖品。</li>
			<li class="name"><img src="/images/wap/p2.png" border="0" width="170" height="47"></li>
			<li class="txt">暂未公布，敬请期待！绝对让你超值到爆！</li>
		</ul>
	</div>
	<div class="moviebox"><embed src="http://player.youku.com/player.php/sid/XMjI0MDIwNDc2/v.swf" quality="high" width="593" height="400" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"></embed></div>
</div>
</div>

<div id="pubs" style="display:none">
<div class="back">
	<div class="namebox"><img src="/images/wap/bar.png" border="0" width="241" height="48"></div>
	<div class="picbox">
		<ul>
			<li class="pic"><img src="/images/wap/pic0-1.png" border="0" width="117" height="116" onclick="sel(1);"></li>
			<li class="pic"><img src="/images/wap/pic1-1.png" border="0" width="117" height="116" onclick="sel(2);"></li>
			<li class="pic"><img src="/images/wap/pic2-1.png" border="0" width="117" height="116" onclick="sel(3);"></li>
			<li class="pic"><img src="/images/wap/pic3-1.png" border="0" width="117" height="116" onclick="sel(4);"></li>
			<li class="input"><input type="radio" name="pic" value="1" checked></li>
			<li class="input"><input type="radio" name="pic" value="2"></li>
			<li class="input"><input type="radio" name="pic" value="3"></li>
			<li class="input"><input type="radio" name="pic" value="4"></li>
		</ul>
	</div>
	<div class="inputbox">
		<div class="count">
			<ul>
				<li class="txt">您排在</li>
				<li class="input" id="countnum"></li>
				<li class="txt">位</li>
			</ul>
		</div>
		<div class="pub">
			<textarea id="content" name="content" style="width:520px;height:235px;margin:10px 0 0 38px;border:0;">外星人来攻打地球啦！！想要第一时间成为保卫世界的英雄吗？超好评第一人称射击游戏《怪物神枪手》空降中国市场！Lucky line排队活动已经启动！选择角色，加入队列，只要参与就有机会获得游戏手机或其他神秘礼品哦！！还在等什么？神枪手们，戳这里狂热参与吧！</textarea>
		</div>
		<div class="bt">
			<ul>
				<li><img src="/images/wap/pub.png" width="171" height="73" onclick="save();" /></li>
				<li><img src="/images/wap/cancel.png" width="171" height="73" onclick="location='/wap'" /></li>
			</ul>
		</div>
	</div>
</div>
</div>


</body>
</html>

